import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from './utils/request'

// 引入element-plus信息
import ElementPlus from 'element-plus'
import { ElTreeSelect } from 'element-plus'
import 'element-plus/dist/index.css'
// 引入element-plus图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)
// 全局注册图标组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(store).use(router).use(ElementPlus);
app.config.globalProperties.$axios = axios;
app.component('ElTreeSelect', ElTreeSelect) // 手动注册
app.mount('#app')


